﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace CommonLib
{
    class XMLConfig2
    {
        private void AppendChild(ref XmlDocument doc, XmlElement node, ref XmlElement result, string nodename, string avalue)
        {
            node = doc.CreateElement(nodename);
            node.SetAttribute("value", avalue);
            result.AppendChild(node as XmlNode);
            result.InnerXml += "\n";
        }

        public void EditChild(ref XmlElement node, string nodename, string avalue)
        {
            (node.SelectSingleNode(nodename) as XmlElement).SetAttribute("value", avalue);
        }

    }
}
